package cn.eli.vue.service.artical;

import cn.eli.vue.entity.Artical;
import cn.eli.vue.entity.LikeArtical;
import cn.eli.vue.entity.SubscribeArtical;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticalService {
    /*发布文章*/
    int ArticalPost(int user_id, String artical_title, String artical_discribe, String artical_img);
    /*修改文章*/
    int ArticalModify(int artical_id,String artical_title,String artical_discribe, String artical_img);
    /*评论文章*/
    int ArticalComment(int artical_id,int user_id,String commentArtical_discribe);
    /*收藏文章*/
    int ArticalSubscribeInsert(int artical_id,int user_id);
    /*收藏文章*/
    int ArticalSubscribeUpdate(int artical_id,int user_id);
    /*取消收藏文章*/
    int ArticalSubscribeCancelDelete(int artical_id,int user_id);
    /*取消收藏文章*/
    int ArticalSubscribeCancelUpdate(int artical_id,int user_id);
    /*点赞文章*/
    int ArticalLikeInsert(int artical_id,int user_id);
    /*点赞文章*/
    int ArticalLikeUpdate(int artical_id,int user_id);
    /*取消点赞文章*/
    int ArticalLikeCancelDelete(int artical_id,int user_id);
    /*取消点赞文章*/
    int ArticalLikeCancelUpdate(int artical_id,int user_id);
    /*获取所有的文章*/
    List<Artical> AllArtical();
    /*获取某个用户的所有文章*/
    List<Artical> AllArticalInUser(int user_id);
    /*获取某个用户点赞的文章*/
    List<LikeArtical> AllArticalInLike(int user_id);
    /*获取某个用户收藏的文章*/
    List<SubscribeArtical> AllArticalInSubscribe(int user_id);
    /*从id获取实体*/
    Artical ArticalIdToArtical(int artical_id);
}
